import Notification from './notification.vue'
import Vue from 'vue'
let NotificationConstructor = Vue.extend(Notification)

Notification.create = () => {
  const Instance = new NotificationConstructor();
  Instance.vm = Instance.$mount();
  document.body.appendChild(Instance.vm.$el);
  return {
    component: Instance,
    notice(notice) {
      Instance.add(notice);
    }
  }
}

export default Notification
